package visual.Cargar;

import javax.swing.*;

public class ScrollPanel extends JPanel
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	JScrollPane sPanel;
	JList lista;
	
	public ScrollPanel()
	{
		lista = new JList();
		sPanel = new JScrollPane(lista, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		
		sPanel.setSize(200, 300);
		
		this.add(sPanel);
		this.setSize(300, 200);
	}
	
	public static void main (String[] args)
	{
		JFrame f = new JFrame();
		f.add(new ScrollPanel());
		f.pack();
		f.setVisible(true);
	}
}
